package com.yixing.tech.datasync.constant;

public enum MatLevelEnum {
    MAT_A(StockOutConstant.MatLevelDictValue.A, "a"), MAT_B(StockOutConstant.MatLevelDictValue.B, "b");

    private final String dictValue;
    private final String rawValue;

    MatLevelEnum(String dictValue, String rawValue) {
        this.dictValue = dictValue;
        this.rawValue = rawValue;
    }

    public String getDictValue() {
        return dictValue;
    }

    public String getRawValue() {
        return rawValue;
    }

    public static MatLevelEnum getByRawValue(String val) {
        for(MatLevelEnum e: MatLevelEnum.values()) {
            if(e.getRawValue().equals(val))
                return e;
        }
        return null;
    }
}
